package com.cqndt.disaster.device.common.util;

import java.util.Map;
import com.cqndt.disaster.device.util.Keys;
import java.util.concurrent.ConcurrentHashMap;

public class MapKeys {

	private static Map<String,Keys> keyMap = new ConcurrentHashMap<>();
	
	public static Map<String, Keys> getKeyMap() {
		for(String key : keyMap.keySet()) {
			Keys keys = keyMap.get(key);
			if((keys.getTime()+3600000) > System.currentTimeMillis()) {
				keyMap.remove(key);
			}
		}
		return keyMap;
	}
	public static void setKeyMap(Map<String,Keys> keyMap) {
		MapKeys.keyMap = keyMap;
	}
}